<template>
	<view>
		<view class="article-content">
			<text class="" v-html="helps.content" selectable="true"></text>
		</view>
	</view>
</template>

<script>
	import htmlParser from '@/common/html-parser'
	export default {
		data() {
			return {
				helps:{}
			};
		},
		onLoad() {
			let that = this;
			let detail = uni.getStorageSync('helps');
			this.helps = JSON.parse(detail);
			
			let newContent = this.helps.content.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi,function(m,c){
				return m.replace(/src="([^<>]*?)"/,'src="' + that.$request.config.baseUrl + c + '"');
				
			});
			this.helps.content = newContent;
			uni.setNavigationBarTitle({
				title: this.helps.title
			});
		},
		methods:{
			read(){
			}
		}
	}
</script>

<style lang="scss">
	.article-content {
		padding: 0 30rpx;
		margin-top: 30rpx;
		overflow: hidden;
		font-size: 30rpx;
		margin-bottom: 30rpx;
	}
</style>
